//
//  GMBuyKnowCell.m
//  Teecloud
//
//  Created by 小熊 on 2018/10/25.
//  Copyright © 2018年 小志. All rights reserved.
//

#import "GMBuyKnowCell.h"
@interface GMBuyKnowCell()
@property (weak, nonatomic) IBOutlet UILabel *name;
@property (weak, nonatomic) IBOutlet UILabel *count;
@property (weak, nonatomic) IBOutlet UIView *bagView;
@property (weak, nonatomic) IBOutlet UIButton *btn;

@end
@implementation GMBuyKnowCell

- (void)awakeFromNib {
    [super awakeFromNib];
    UITapGestureRecognizer *tapGR = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(clickMenuBtn:)];
    [self.bagView addGestureRecognizer:tapGR];

}
-(void)setModel:(GMCommentBaseModel *)model{
    _model = model;
    if ([model.ResType isEqualToNumber:@(9)]) {
        self.name.text = @"资源目录";
        self.count.text =[NSString stringWithFormat:@"%ld条",model.packArr.count];
    }else{
        self.name.text = @"知识点";
        self.count.text =[NSString stringWithFormat:@"%ld条",model.Dirs.count];
    }
    if (model.isopen) {
        self.btn.selected = YES;
    }else{
        self.btn.selected = NO;
    }
   
}
- (void)clickMenuBtn:(id)sender{
    self.block();
}


@end
